<template>
	<view>
		
<!-- 		<view class="flex p20">
			<image src="/static/img/index/search.png" mode="widthFix" class=" search-icon"></image>
			<input type="text" placeholder="请输入要查找的信息" class="search" placeholder-style="
			font-size:26rpx;color:#666666;" v-model="inputVue">
		</view>

<view class="line"></view> -->
		<!-- 申请列表 -->
		<view class="">
			<view class="" v-for="(i,index) in list" :key="index" @click="$pub.go(list_url+'?id='+i.id+'&name='+name +'&toid='+userid+'&wz='+wz)">
				<view class="flex " style="height: 200rpx;padding: 30rpx;box-sizing: border-box;">
					<image src="/static/img/index/header-blue.png" mode=""></image>
					<image src="/static/img/index/header-blue.png" mode="widthFix" class="wid55 mr10"></image>
					<view class="f1 wid55-cen">
						<view class="f15 c6">
						{{i.hospital}}
						</view>
					
						<view class="c6 f15">
							{{i.yishengname}}
						</view>
						<!-- <view class="f15 c6">
							{{i.note}}3
						</view> -->
					</view>
					<view class="wid55-cen" style="text-align: right;">
						<view class="c6 f14">
							{{i.keshi}}
						</view>
						<view class="f15 ">
							{{i.createtime}}
						</view>
					</view>
				</view>
				<view class="line"></view>
			</view>

			<view class="z70">

			</view>
		</view>

	
	</view>
</template>

<script>
	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'
	export default {
		data() {
			return {

				list_url: '/pages/my/bingli/content/content',
				flag: false,
				statusBarHeight: statusBarHeight,
				userid:'',
				name:'',
				inputVue:'',
				list: [ 
					// {
					// 	img: '/static/img/index/header-blue.png',
					// 	name:'医院1',
					// 	title: '科室1',
					// 	note: '2021/10/08',
					// 	date: '医生1',
					// },
					// {
					// 		img: '/static/img/index/header-blue.png',
					// 		name:'医院1',
					// 		title: '科室1',
					// 		note: '2021/10/08',
					// 		date: '医生1',
					// 	},
					// {
					// 		img: '/static/img/index/header-blue.png',
					// 		name:'医院1',
					// 		title: '科室1',
					// 		note: '2021/10/08',
					// 		date: '医生1',
					// 	},
					
				],
				wz:'',
			}
		},
		onLoad(id){ 
			this.userid = id.id
			this.name = id.name
			this.wz = id.wz
			if(this.userid){ 
				this.getList()
				console.log(1);
			}else{ 
				this.getLists()
				console.log(2);
			}
			
		},
		methods: {
			fanHui() {
				console.log(1);
				uni.navigateBack({
					delta: 1  //返回两层页面
				});
			},
			zhi() {
				console.log(1);
				this.flag = !this.flag

			},
			getList(){ 
				this.request({
					url:'/richangjingying/selectBingLi?userId='+this.userid+'&utype=病历&isLastst=false',
				}).then(res =>{ 
					console.log(res.data,666);
					this.list = res.data
					// console.log(this.lists[4].udoorFacePic,26);
				})
			},
			getLists(){
				this.request({
					url:'/richangjingying/selectAllBingLiOrChuFan?type=病历',
				}).then(res =>{ 
					console.log(res.data,666);
					this.list = res.data
					// console.log(this.lists[4].udoorFacePic,26);
				})
			},
			getName(){ 
				this.request({
					url:'/richangjingying/selectLikeAllBingLiOrChuFan?type=病历&name='+this.inputVue,
				}).then(res =>{ 
					console.log(res.data,666);
					this.list = res.data
					// console.log(this.lists[4].udoorFacePic,26);
				})
			}
		},
		watch:{ 
			inputVue(e){ 
				if(e == ''){ 
					this.getList()
				}else{ 
					this.getName()
				}
			}
		}
	}
</script>

<style lang="less">
.box {
		position: fixed;
		top: 0rpx;
		left: 0;
		z-index: 1000;
		width: 100%;
	background-color: #48d9d9;
		color: #fff;
		.box-nr {
			display: flex;
			justify-content: space-between;
			padding: 20rpx;
			box-sizing: border-box;
			background-color: #48d9d9;
			align-items: center;
			font-size: 35rpx;
				position: relative;
			.box-wz {
				// font-size: 3;
				font-weight: 700;
			}

			.box-right {
				position: relative;

				.tan {
					position: absolute;
					z-index: 99;
					left: -106rpx;
					bottom: -266rpx;
					background-color: #3D4043;
					.tan-qian{
						position: absolute;
						left: 104rpx;
						top: -37rpx;
						border: 20rpx solid;
						 border-color:transparent  transparent  #3D4043 transparent ;
						 width: 0;
						 // height: 0;
					}
					.tan-nr {
						padding: 20rpx 40rpx;
						width: 100rpx;
						height: 40rpx;
						border-bottom: 1rpx solid #fff;
						text-align: center;
						color: #fff;
					}
				}
			}
		}
	}
</style>
